package com.nf.action;

import com.nf.Tax.ITaxUtil;
import com.nf.Tax.TaxUtillmpl1;
import com.nf.Tax.TaxUtillmpl2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test2 {
    public static void main(String[] args) {
//        //统一接口
//        ITaxUtil i1 = new TaxUtillmpl1();
//        ITaxUtil i2 = new TaxUtillmpl2();
//        System.out.println(i1.calaTax(1000));
//        System.out.println(i2.calaTax(6000));
//        //统一类
//        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
//        ITaxUtil i3 = (ITaxUtil) ac.getBean("t1");
//        ITaxUtil i4 = (ITaxUtil) ac.getBean("t2");
//        System.out.println(i3.calaTax(1000));
//        System.out.println(i4.calaTax(6000));
    }
}
